package com.xq.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xq.entity.BizOutStock;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * (BizOutStock)表数据库访问层
 *
 * @author makejava
 * @since 2020-08-09 17:03:45
 */
public interface BizOutStockDao extends BaseMapper<BizOutStock> {
    /**
     * 查询+分页
     * @param page 分页对象
     * @param queryWrapper 条件
     * @return
     */
    @Select("select os.id,os.out_num,os.type,os.priority,cs.address,cs.contact \n" +
            ",os.product_number ,\n" +
            "cs.phone \n" +
            ",os.`status` ,os.operator ,os.create_time\n" +
            "from biz_out_stock os LEFT join biz_consumer cs\n" +
            "on os.consumer_id=cs.id ${ew.customSqlSegment}")
    Page<BizOutStock> findByPage(Page<BizOutStock> page,@Param(Constants.WRAPPER) QueryWrapper queryWrapper);

    
}